package com.shanyin.framework.member.web;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.fastjson.JSONObject;
import com.shanyin.framework.member.entity.SysDictDetail;
import com.shanyin.framework.member.service.SysDictDetailService;

/***
 ** @category 请用一句话来描述其用途...
 ** @author qing.yunhui
 ** @email: 280672161@qq.com
 ** @createTime: 2018年5月25日下午3:16:18
 **/
@RestController
@RequestMapping(SysDictDetailController.ACTION_PATH)
public class SysDictDetailController {
	
	final Logger logger = LoggerFactory.getLogger(getClass());
	
    final static String ACTION_PATH="/sys/dictDetail";

    @Autowired
	private SysDictDetailService sysDictDetailService;
    
    @GetMapping("/getDictDetailByItemKey")
	public List<SysDictDetail> getDictDetailByItemKey(@PathVariable String itemKey) {
		logger.info("==========>itemKey={}.",new Object[] {itemKey});
		List<SysDictDetail> dictDetailList = sysDictDetailService.querySysDictDetailByItemKey(itemKey);
		logger.info("==========>dictDetailList={}.",new Object[] {JSONObject.toJSONString(dictDetailList)});
		return dictDetailList;
	}

}
